public class Main {
    /*public static void main(String[] args) {
        System.out.println("hello");
    }*/
    public static void main(String[] args) {
        int count = 0;
        for(int i = 1;i <= 100;i++) {
            int val = i;
            while (val > 0) {
                if (val % 10 == 9) count++;
                val /= 10;
            }
        }
        System.out.println(count);
    }
}
